<?php 
$curenncy = $this->utility->currency('USD','VND','1');
$curl = $this->lang->lang() == 'vi'? 1: $curenncy;


?>  

 <div class="floatRight sec_2" style="width:785px;margin-right:90px;">

    	<style type="text/css">

        .table div{width:760px;height:auto;display:table;}

		.table div p{ display:table-cell; vertical-align:middle;}

		.first{background-color:#E2E2E2;font-weight:bold;font-size:25px;}

		.last{border:1px dashed #a2a2a2;height:35px;}

		.table div{float:left; border-top:1px dashed #a2a2a2;border-right:1px dashed #a2a2a2;padding:7px;font-size:14px;height:40px;}

		.first div{min-height:30px;}

		.table div.item{width:205px;border-left:1px dashed #a2a2a2;}

		.table div.quom{width:75px;}

		.table div.qty{width:40px;}

		.table div.qty input{width:25px;}

		.table div.price{width:120px;}

		.table div.total{width:150px;}

		.table div.control{width:100px; text-align:center;}

		.table div.control a{margin-left:10px;}

		.last h1{width:50%;font-size:18px;font-weight:normal;float:left; text-align:right;font-weight:bold;}

		.last a{font-size:18px;background-color:#08ABC8;padding:5px;line-height:20px;float:left;margin-top:2px;color:#fff;}

        </style>
	<div style="float:right;"><a href="<?php echo base_url('shopping_cart/')?>"><?php echo lang('template.shop_con');?></a></div>
    	<div class="box"><h1><?php echo lang('template.your_cat');?></h1></div>
	<?php 
		$url = null;
		if($this->session->userdata('username')){
			$url='https://www.sandbox.paypal.com/cgi-bin/webscr';
		}
		else 
		{
			$url=base_url('login');
		}?>
    	<form action=<?php echo $url?> method="post">
    				<input type="hidden" name="cmd" value="_cart">
					<input type="hidden" name="upload" value="1">
					<input type="hidden" name="business" value="seller_1328165621_biz@gmail.com">

        <div class="table first">

			<div class="item"><p><?php echo lang('template.item');?></p></div>

			<div class="quom"><p><?php echo lang('template.quom');?></p></div>

			<div class="qty"><p><?php echo lang('template.qty');?></p></div>

			<div class="price"><p><?php echo lang('template.price');?></p></div>

			<div class="total"><p><?php echo lang('template.total');?></p></div>

            <div class="control"><p><?php echo lang('template.control');?></p></div>

            <p class="clear"></p>

        </div><!-- END TABLE FIRST -->

        <?php
        $i=1;
         foreach ($this->cart->contents() as $pro){
         ?>
           		     <input type="hidden" name="item_name_<?php echo $i; ?>" value="<?php echo $pro['name']; ?>">
					<input type="hidden" name="item_number_<?php echo $i; ?>" value="<?php echo $pro['id']; ?>">
					<input type="hidden" name="amount_<?php echo $i; ?>" value="<?php echo $this->cart->format_number($pro['price']/$curenncy);
                    																	//echo $item['price'] ?>">
					<input type="hidden" name="quantity_<?php echo $i; ?>" value="<?php echo $pro['qty']; ?>">
       
            <div class="table" id="row_<?php echo $pro['id']?>">

			<div class="item"><p>#<?php echo $pro['id']?><br /><?php echo $pro['name']?></p></div>

			<div class="quom"><p>12/Case</p></div>

			<div class="qty"><p>
			
			<input type="text" id="quantity_<?php echo $pro['id']?>" class="input" value="<?php echo $pro['qty']?>"/>
	
			</p></div>

			<div class="price" ><label style="font-size:12px;" id="price_<?php echo $pro['id']?>"><?php echo $this->cart->format_number(round($pro['price']/$curl,4))?></label><?php echo lang('template.cur');?></div>

			<div class="total" ><label style="font-size:12px;" id="total_price_<?php echo $pro['id']?>"><?php echo $this->cart->format_number(round($pro['subtotal']/$curl,4))?></label><?php echo lang('template.cur');?></div>

            <div class="control">
            	<p>
	            	<a href="#" style="text-decoration: none;" onclick="update_to_cart('<?php echo $pro['id']?>','<?php echo $pro['rowid']?>','<?php echo base_url($this->lang->lang())?>','<?php echo $pro['price']?>')">
	            		<img src="<?php echo base_url ( 'assets/images/product/update.png' )?>" height="25" />
					</a>
					<a href="#" style="text-decoration: none;" onclick="remove_to_cart('<?php echo $pro['id']?>','<?php echo $pro['rowid']?>','<?php echo base_url($this->lang->lang())?>')"">
						<img src="<?php echo base_url ( 'assets/images/product/del.png' )?>" height="25" />
					</a>
					<!--<?php echo anchor('cart/update_cart_item/'.$pro['id'].'/'.$pro['qty'],'test')?>
				--></p>
			</div>

            <p class="clear"></p>

        </div>
<?php $i++; }?>
	   				<input type="hidden" name="currency_code" value="USD">
					<input type="hidden" name="lc" value="US">
					<input type="hidden" name="rm" value="2">
					<input type="hidden" name="shipping_1" value="0">
					<input type="hidden" name="return" value="<?php echo base_url($this->lang->lang() . '/success')?>">
					<input type="hidden" name="cancel_return" value="http://www.phpvideotutorials.com/gamelist/">
					<input type="hidden" name="notify_url" value="http://www.phpvideotutorials.com/gamelist/paypal.php">        

        <div class="table last">

			<h1 style="text-align: center;"><?php echo lang('template.cost');?> : <label id="total_cost"><?php echo $this->cart->format_number(round($this->cart->total()/$curl,4))?></label> <?php echo lang('template.cur')?></h1>

            <!--<a href="https://www.sandbox.paypal.com/cgi-bin/webscr" class="checkOut">Check out</a>
                      --><input type="submit" value="<?php echo lang('template.checkout')?>" onclick="insertOrderIsStatusPending('<?php echo base_url($this->lang->lang())?>');" style="height:25px;width:80px;margin-top:5px;"> 
         
        </div><!-- END TABLE LAST -->

        </form>

    </div><!-- END SEC 2 -->

    

    

    <div class="floatRight sec_3" style="width:0px;">


    </div><!-- END RIGHT -->

